package org.jmetrix.et.sample.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

import java.util.concurrent.TimeUnit;

/**
 * @author Konstantin Kuzmin
 * @version $Revision$
 * @since 09.09.12
 */
@Aspect
public class ThroughputAspect extends org.jmetrix.throughput.ThroughputAspect {
    @Around("call (public void org.jmetrix.et.sample.SomeClass.someComplexMethod(..))")
    public Object measureComplexMethod(final ProceedingJoinPoint pjp) throws Throwable {
        return super.measure(pjp);
    }

    @Override
    protected TimeUnit getTimeUnit() {
        return TimeUnit.MINUTES;
    }
}
